package com.boarsoft.boar.gateway.weixin.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.boarsoft.boar.gateway.weixin.biz.WxUserBiz;
import com.boarsoft.boar.gateway.weixin.service.WxQmsgService;
import com.boarsoft.cache.Cache;
import com.boarsoft.message.bean.Message;
import com.boarsoft.message.core.MessageService;

@Component("wxQ0101Service")
public class WxQ0101ServiceImpl extends WxQmsgService implements MessageService {
	
	@Autowired
	protected WxUserBiz wxUserBiz;
	
	@Autowired
	protected Cache cache;
	
	public Cache getCache(){
		return cache;
	}
	
	public WxUserBiz getWxUserBiz(){
		return wxUserBiz;
	}
	
	@Override
	public void put(Message msg) throws Exception {
		@SuppressWarnings("unchecked")
		List<Map<String, Object>> list = (List<Map<String, Object>>) msg.getContent();
		this.sendMessage(list);
	}
	
}
